home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
BSCRIPTS.CST
/
00084_Script_CDsmallMenu
< prev
next >
Wrap
Text File
|
1999-04-25
|
5KB
|
144 lines
-- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
-- Developed for Bombardier, Inc.
--
-- All programming developed by:
-- Robert Fabricant, Valerie Valoueva, Ossi Shaked,
-- Henry Sauvageot, Chris Howell & Chris Girand
--
-- Use of this code by parties other than @radical.media, inc. or their
--agents
-- without the express written consent of @radical.media, inc. AND Concurrent
-- New Media Group, L.L.C. is strictly prohibited.
------------------------------------------------------
property mySprite, NeutralName, HiliteName, linkedNumberGrayName, linkedFieldGrayName, selected, detailNum, linkedNumberHilName,linkedFieldHilName
global currentDetail, nextDetail
global linkedNumberNeutralName,linkedNumberSprite,linkedFieldNeutralName,linkedFieldSprite
on new me
set mySprite = the spriteNum of me
set NeutralName = getNeutralName(me, mySprite)
set detailNum = getDetailNum(me)
if NeutralName contains "-hil" then--we are currently in this detail's section
set currentDetail = detailNum
set selected = 1
-- Detail's title consists of two sprites:
-- #bmp "Number" and #richtext "Field".
-- We have to find out in which channels they are located
set linkedNumberNeutralName = detailNum & "head"--constract a Titles
set linkedNumberSprite = getSpriteNumFromMemberName (linkedNumberNeutralName)
set linkedFieldNeutralName = detailNum & "headfield"
set linkedFieldSprite = getSpriteNumFromMemberName (linkedFieldNeutralName)
else
set selected = 0
-- Constract the names of cast members that will form the title
-- when rolled over an item in the cabin details menu
set HiliteName = NeutralName&"-hil"
set linkedNumberGrayName = detailNum & "head-gray"
set linkedNumberHilName = detailNum & "head"
set linkedFieldGrayName = detailNum & "headfield-gray"
set linkedFieldHilName = detailNum & "headfield"
end if
end
on getDetailNum me
set myString = ""
repeat with i = 1 to the Number of Chars in NeutralName
set value = integer(char i of NeutralName)
if not(voidP(value)) then
set myString = myString&string(value)
else
exit repeat
end if
end repeat
return myString
end
on mouseEnter me
if (the frameLabel contains "exit") or (the frameLabel contains "enter") then
-- Disable this handler if a frame transition is not over yet
nothing
else
if not selected then
set nextDetail = detailNum
set the member of sprite mySprite = member HiliteName
set the member of sprite linkedNumberSprite = member linkedNumberGrayName
set the member of sprite linkedFieldSprite = member linkedFieldGrayName
puppetsound 3, "newroll"
end if
end if
end
on mouseLeave me
if (the frameLabel contains "exit") or (the frameLabel contains "enter") then
-- Disable this handler if a frame transition is not over yet
nothing
else
if not selected then
set the member of sprite mySprite = member NeutralName
set the member of sprite linkedNumberSprite = member linkedNumberNeutralName
set the member of sprite linkedFieldSprite = member linkedFieldNeutralName
end if
end if
end
on mouseUp me
if (the frameLabel contains "exit") or (the frameLabel contains "enter") then
-- Disable this handler if a frame transition is not over yet
nothing
else
if not selected then
set the member of sprite linkedNumberSprite = member linkedNumberHilName
set the member of sprite linkedFieldSprite = member linkedFieldHilName
go to frame "exit_det"& currentDetail
puppetsound 3, "newclick"
end if
end if
end
on CDSmallMenuPuppetsOff me
-- puppetsprite mySprite, false
-- puppetsprite linkedNumberSprite, false
-- puppetsprite linkedFieldSprite, false
end
on getNeutralName me,SpriteNum
set aMember = the member of sprite spriteNum
set Name = the name of member aMember
return Name
end
on exitFrame me
if the frame = label("exit2_det"& currentDetail) then
-- sendAllSprites(#CDSmallMenuPuppetsOff)
repeat while soundbusy(3)
end repeat
go to "enter_det"&nextDetail
puppetTransition 02,8,1
puppetsound 3, "touranimrev"
end if
if the frame = label("exit_det"& currentDetail) then
puppetTransition 01,8,1
puppetsound 3, "touranim"
end if
end